package io.renren.runner;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import io.renren.common.utils.R;
import io.renren.modules.iots.service.IotsIotserverService;

/**
 * 启动之后，发送 给 IOTS 配置
 * 
 * @author lfy.xys
 * @date 2018年6月7日
 *
 */
//@Component
public class SendIOTSConfigRunner implements CommandLineRunner {
	private static Logger logger = LoggerFactory.getLogger(SendIOTSConfigRunner.class);

	@Autowired
	private IotsIotserverService iotsIotserverService;

	public void run(String... var1) throws Exception {
		R r = iotsIotserverService.sendAllIOTSConfig();
		logger.info(r.get("code") + "," + r.get("msg"));

	}
}
